<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form);

    //Variable de la pagina
   $urlLoadUserClose   = "javascritp:MenuClose();";
?>
<!--BOTON cerrado + condicion de actualización-->
<button type="button" class="slideDer-cerrar" onclick="<?php echo $urlLoadUserClose; ?>"></button>
<!--Division del formulario-->
<div class="jwj-callcenter-div"></div>

<!--Formulario con declaración de class y de ID Formulario-->
<form id="myFormOperador" class="formGeneralModel" style="margin-top: 50px" action="<?php echo url_for('kilometraje/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
  <table class="formGeneralTable" >
    
    <tbody>
       <tr class="addEtiquetaTitulo">
            <td colspan="2"><p>Cargar Kilometraje a Camioneta</p></td>
      </tr>
      <?php echo $form->renderGlobalErrors() ?>
      <tr>
        <th><?php echo $form['camioneta_id']->renderLabel() ?></th>
        <td>
          <?php echo $form['camioneta_id']->renderError() ?>
          <?php echo $form['camioneta_id'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['kilometraje']->renderLabel() ?></th>
        <td>
          <?php echo $form['kilometraje']->renderError() ?>
          <?php echo $form['kilometraje'] ?>
        </td>
      </tr>
    </tbody>
  </table>

<div class="jwj-callcenter-div"></div>


<!--Lista de Acciones del Formulario-->
<div id="jwj-callcenter-action">
    
           <?php echo $form->renderHiddenFields(false) ?>
          <!--BOTON Salvado del formulario-->
          <input type="submit" value="Save" id="jwj-callcenter-form-save" class="jwj-callcenter-form-red"/>
          
          <!--BOTON Cerrar-->
          <button type="button" id="AddBoton-Cerrar" title="Cerrar" class="AddBotonTools" onclick="<?php echo $urlLoadUserClose; ?>">Cerrar</button>
          
</div>
</form>
<!--Ejecucion del Formulario por Jquery para evitar recarga-->
<script type="text/javascript">
    
   
// prepare tde form when tde DOM is ready
$(document).ready(function() {
    var options = {
        target:        '#myFormOperador',   // target element(s) to be updated witd server response
        beforeSubmit:  showRequest,  // pre-submit callback
        success:       showResponse,  // post-submit callback
        type: 'post'       // 'get' or 'post', override for form's 'method' attribute

    };

    // bind form using 'ajaxForm'
    $('#myFormOperador').ajaxForm(options);
});

// pre-submit callback
function showRequest(formData, jqForm, options) {
    // formData is an array; here we use $.param to convert it to a string to display it
    // but tde form plugin does tdis for you automatically when it submits tde data
    var queryString = $.param(formData);
    // here we could return false to prevent tde form from being submitted;
    // returning anytding otder tdan false will allow tde form submit to continue
    return true;
}

// post-submit callback
function showResponse(responseText, statusText, xhr, $form)  {
    
     
     
}
</script>